#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
    int i = 0;
    int j = 0;
    int a = 0;
    while (scanf("%d", &a) != -1)
    {
        int d = 3 * a;
        for (i = 0; i < a; i++)
        {
            for (j = d - 1; j > 0; j--)
            {
                printf(" ");
            }
            for (j = 0; j < i + 1; j++)
            {
                printf("*     ");
            }
            printf("\n");
            for (j = d - 2; j > 0; j--)
            {
                printf(" ");
            }
            for (j = 0; j < i + 1; j++)
            {
                printf("* *   ");
            }
            printf("\n");
            for (j = d - 3; j > 0; j--)
            {
                printf(" ");
            }
            for (j = 0; j < i + 1; j++)
            {
                printf("* * * ");
            }
            printf("\n");
            d -= 3;
        }
        for (i = 0; i < a; i++)
        {
            for (j = 0; j < 3 * a - 1; j++)
            {
                printf(" ");
            }
                printf("*\n");
        }
    }
    return 0;
}